<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.qiqianyi.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 晓乐 <wxl@yuzixing.com>
// +----------------------------------------------------------------------
namespace app\company\service;

use app\company\model\MemberLevelModel;
use app\company\model\CompanyNatureModel;
use app\company\model\MemberQualityModel;
use app\company\model\MemberStatusModel;
use app\company\model\CompanyCategoryModel ;
use app\company\model\MemberCategoryModel ;
use app\company\model\RelationCategoryModel ;
use app\company\model\BreedStatusModel ;
use app\company\model\MemberGroupModel;
use app\company\model\QaCategoryModel;
use app\company\model\QaStatusModel;



class CategoryService
{


    public static function queryQaStatusList(){
        $model = new QaStatusModel();
        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();
        // print ($model->getLastSql());


        return $return;
    }


    public static function queryQaCategoryList(){
        $model = new QaCategoryModel();
        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();
        // print ($model->getLastSql());


        return $return;
    }


    public static function queryMemberGroupList(){
        $model = new MemberGroupModel();
        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();
        // print ($model->getLastSql());


        return $return;
    }


    public static function queryCompanyCategoryList(){
        $model = new CompanyCategoryModel();
        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();
        // print ($model->getLastSql());


        return $return;
    }


    /**
     * 获取会员分类列表
     * @return false|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */

    public static function queryMemberCategoryList()
    {
        $model = new MemberCategoryModel();

        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();

        // print ($model->getLastSql());


        return $return;
    }


    /**
     * 获取孕育状态列表
     * @return false|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */

    public static function queryBreedStatusList()
    {
        $model = new BreedStatusModel();

        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();

        // print ($model->getLastSql());


        return $return;
    }


    /**
     * 获取与孩子关系分类列表
     * @return false|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */

    public static function queryRelationCategoryList()
    {
        $model = new RelationCategoryModel();

        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();

        // print ($model->getLastSql());


        return $return;
    }



    /**
     * 获取会员状态列表
     * @return false|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */

    public static function queryMemberStatusList()
    {
        $model = new MemberStatusModel();

        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();

        // print ($model->getLastSql());


        return $return;
    }

    /**
     * 获取会员质量列表
     * @return false|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */

    public static function queryMemberQualityList()
    {
        $model = new MemberQualityModel();

        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();

        // print ($model->getLastSql());


        return $return;
    }


    /**
     * 获取会员等级列表
     * @return false|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function queryMemberLevelList()
    {
        $model = new MemberLevelModel();

        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return = $model->where($where)->order($order)->select();

        // print ($model->getLastSql());


        return $return;
    }


    /**
     * 获取企业性质列表
     * @return false|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function queryCompanyNatureList()
    {
        $model = new CompanyNatureModel();

        $where = [
            'delete_time'    => 0
        ];

        $order    = "list_order";

        $return =  $model->where($where)->order($order)->select();

       // print ($model->getLastSql());


        return $return;
    }

}